Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Apache Commons DBCP 2 (and Commons Pool 2) #1022

Closed
wants to merge 6 commits into from

Conversation

dstenger
Copy link
Contributor

@dstenger dstenger commented Nov 27, 2019

Apache Commons DBCP and Commons Pool dependencies were upgraded to version 2.7.0.

Reason: Currently used version is outdated and not maintained by the community any more.

Also, the documentation was updated and improved in some points (e.g. for destroyMethod).

Closes #1017.

@dstenger dstenger added the enhancement enhancement or improvement label Nov 27, 2019
@tfr42 tfr42 added the dependencies Pull requests that update a dependency (library) label Mar 6, 2020
@lgoltz
Copy link
Contributor

lgoltz commented Jan 27, 2021

Fixed formatting, use of string placeholders: 9243ec4

@tfr42 tfr42 added the ready label Mar 16, 2022
@copierrj
Copy link
Member

This PR is ready to be merged. However, the TMC decided that we should postpone merging this PR until we're ready to release deegree 3.5 as this change breaks existing workspaces.

Copy link
Contributor

@julianzz98 julianzz98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggested changes in this PR were successfully tested with a PostgreSQL DB and INSPIRE features as datasource. The only problem right now seems to be the right way in approaching the change on the user side.

The user could i.e. manually change the configuration of the existing database connection, which screams to be error prone. The other way would be to delete the current database connection and creating a new one in its place. Here could already be the "problem" as deleting an existing db connection and then creating a new one with the same name is followed up by a NPE:

HTTP Status 500 – Internal Server Error
Type Exception Report

Description
The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.deegree.client.core.filter.InputFileFilter.doFilter(InputFileFilter.java:76)
Root Cause

java.lang.NullPointerException
	java.io.Reader.<init>(Reader.java:78)
	java.io.InputStreamReader.<init>(InputStreamReader.java:113)
	org.apache.commons.io.IOUtils.copy(IOUtils.java:892)
	org.apache.commons.io.IOUtils.toString(IOUtils.java:2650)
	org.apache.commons.io.IOUtils.toString(IOUtils.java:2630)
	org.deegree.console.generic.XmlEditorBean.getContent(XmlEditorBean.java:182)
	sun.reflect.GeneratedMethodAccessor200.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	javax.el.BeanELResolver.getValue(BeanELResolver.java:91)
	com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
	com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
	org.apache.el.parser.AstValue.getValue(AstValue.java:168)
	org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
	com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
	javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
	javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
	javax.faces.component.UIOutput.getValue(UIOutput.java:170)
	com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
	javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:881)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
	com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	com.avax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
	javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
	javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
	javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
	com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
	com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.deegree.client.core.filter.InputFileFilter.doFilter(InputFileFilter.java:76)avax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
	javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105)
	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:851)
	javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
	javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
	javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
	com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
	com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.deegree.client.core.filter.InputFileFilter.doFilter(InputFileFilter.java:76)

As it is the PR could be merged but an update on this topic for the users sake would be necessary.

@tfr42 tfr42 added this to the 3.5 milestone May 13, 2022
@tfr42 tfr42 added the needs rebase PR is not up to date and needs rebase label May 14, 2022
@stephanr
Copy link
Member

This PR was replaced by #1337

@stephanr stephanr closed this May 14, 2022
@tfr42 tfr42 added invalid invalid and removed enhancement enhancement or improvement ready needs rebase PR is not up to date and needs rebase dependencies Pull requests that update a dependency (library) labels May 14, 2022
@tfr42 tfr42 removed this from the 3.5 milestone May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid invalid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Apache Commons Pool and Commons DBCP
6 participants